package com.cjkj.hospital.domain;

import com.cjkj.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 医院分配的设备对象 t_hospital_equipment
 * 
 * @author cjkj
 * @date 2024-08-28
 */
public class THospitalEquipment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 医院信息ID */
    private String hospitalId;

    /** 设备信息ID */
    private String equipmentId;

    /** 分配状态（0=已回收，1=已分配） */
    private String distributeStatus;

    /** 设备分配到院时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date distributeTime;

    /** 分配次数 */
    private Integer usageFrequency;

    /** 提醒阈值 */
    private Integer reminderThreshold;

    /** 是否测试设备（1-是，0-否） */
    private String testFlag;

    /** 是否分配到科室（0=未分配；1=已分配） */
    private String allocationFlag;

    /** 科室id */
    private String deptId;

    /** 设备使用状态（1=使用中；0=未使用） */
    private String useFlag;

    /** 设备回收时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date recoveryTime;

    /** 激活状态（0=未激活，1=已激活） */
    private String activeFlag;

    /** 设备状态: 0=在线；1=离线； */
    private String onlineStatus;

    /** 最后一次上线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastOnlineTime;

    /** 最后一次下线时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastOfflineTime;

    /** 0=设备正常；1=设备故障 */
    private String failureFlag;

    /** 设备故障时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date failureStartTime;

    /** 删除标志（0=存在；2=删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setHospitalId(String hospitalId) 
    {
        this.hospitalId = hospitalId;
    }

    public String getHospitalId() 
    {
        return hospitalId;
    }
    public void setEquipmentId(String equipmentId) 
    {
        this.equipmentId = equipmentId;
    }

    public String getEquipmentId() 
    {
        return equipmentId;
    }
    public void setDistributeStatus(String distributeStatus) 
    {
        this.distributeStatus = distributeStatus;
    }

    public String getDistributeStatus() 
    {
        return distributeStatus;
    }
    public void setDistributeTime(Date distributeTime) 
    {
        this.distributeTime = distributeTime;
    }

    public Date getDistributeTime() 
    {
        return distributeTime;
    }
    public void setUsageFrequency(Integer usageFrequency) 
    {
        this.usageFrequency = usageFrequency;
    }

    public Integer getUsageFrequency() 
    {
        return usageFrequency;
    }
    public void setReminderThreshold(Integer reminderThreshold) 
    {
        this.reminderThreshold = reminderThreshold;
    }

    public Integer getReminderThreshold() 
    {
        return reminderThreshold;
    }
    public void setTestFlag(String testFlag) 
    {
        this.testFlag = testFlag;
    }

    public String getTestFlag() 
    {
        return testFlag;
    }
    public void setAllocationFlag(String allocationFlag) 
    {
        this.allocationFlag = allocationFlag;
    }

    public String getAllocationFlag() 
    {
        return allocationFlag;
    }
    public void setDeptId(String deptId) 
    {
        this.deptId = deptId;
    }

    public String getDeptId() 
    {
        return deptId;
    }
    public void setUseFlag(String useFlag) 
    {
        this.useFlag = useFlag;
    }

    public String getUseFlag() 
    {
        return useFlag;
    }
    public void setRecoveryTime(Date recoveryTime) 
    {
        this.recoveryTime = recoveryTime;
    }

    public Date getRecoveryTime() 
    {
        return recoveryTime;
    }
    public void setActiveFlag(String activeFlag) 
    {
        this.activeFlag = activeFlag;
    }

    public String getActiveFlag() 
    {
        return activeFlag;
    }
    public void setOnlineStatus(String onlineStatus) 
    {
        this.onlineStatus = onlineStatus;
    }

    public String getOnlineStatus() 
    {
        return onlineStatus;
    }
    public void setLastOnlineTime(Date lastOnlineTime) 
    {
        this.lastOnlineTime = lastOnlineTime;
    }

    public Date getLastOnlineTime() 
    {
        return lastOnlineTime;
    }
    public void setLastOfflineTime(Date lastOfflineTime) 
    {
        this.lastOfflineTime = lastOfflineTime;
    }

    public Date getLastOfflineTime() 
    {
        return lastOfflineTime;
    }
    public void setFailureFlag(String failureFlag) 
    {
        this.failureFlag = failureFlag;
    }

    public String getFailureFlag() 
    {
        return failureFlag;
    }
    public void setFailureStartTime(Date failureStartTime) 
    {
        this.failureStartTime = failureStartTime;
    }

    public Date getFailureStartTime() 
    {
        return failureStartTime;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("hospitalId", getHospitalId())
            .append("equipmentId", getEquipmentId())
            .append("distributeStatus", getDistributeStatus())
            .append("distributeTime", getDistributeTime())
            .append("usageFrequency", getUsageFrequency())
            .append("reminderThreshold", getReminderThreshold())
            .append("testFlag", getTestFlag())
            .append("allocationFlag", getAllocationFlag())
            .append("deptId", getDeptId())
            .append("useFlag", getUseFlag())
            .append("recoveryTime", getRecoveryTime())
            .append("activeFlag", getActiveFlag())
            .append("onlineStatus", getOnlineStatus())
            .append("lastOnlineTime", getLastOnlineTime())
            .append("lastOfflineTime", getLastOfflineTime())
            .append("failureFlag", getFailureFlag())
            .append("failureStartTime", getFailureStartTime())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
